/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.cput.designpatterns.structural.adapter;

/**
 *
 * @author user
 */
public class TemperatureClassReporter extends CalciusReporter implements TemperatureInfo{

    @Override
    public double getTemperatureInf() {
        return cToF(temperatureInc);
    }

    @Override
    public void setTemperatureInf(double temperatureInf) {
       this.temperatureInc = fToC(temperatureInf);
    }

    @Override
    public double getTemperatureInc() {
        return temperatureInc;
    }

    @Override
    public void setTemperatureInc(double temperatureInc ) {
        this.temperatureInc = temperatureInc;
    }
    
    private double fToC(double f){
        return ((f-32) * 5/9);
    }
    
    public double cToF(double c){
        return ((c* 9 / 5) +32);
    }
    
}
